package cn.hrlly.tao2shou.biz;

import com.zhy.http.okhttp.OkHttpUtils;

import cn.hrlly.tao2shou.other.Config;
import cn.hrlly.tao2shou.callback.RequireDetailsCallback;
import cn.hrlly.tao2shou.domain.Requires;
import cn.hrlly.tao2shou.listener.OnRequireDetailsListener;

/**
 * User: gengliang
 * Date: 2016-01-30
 * Time: 10:23
 */

public class RequireDetailsBizImpl implements RequireDetailsBiz {

    private OnRequireDetailsListener onRequireDetailsListener;

    public RequireDetailsBizImpl(OnRequireDetailsListener onRequireDetailsListener){
        this.onRequireDetailsListener=onRequireDetailsListener;
    }

    @Override
    public void getNetRequireDetails(Requires requires) {
        OkHttpUtils
                .post()
                .url(Config.key_url)
                .addParams(Config.key_action,Config.action_require_details)
                .addParams(Config.key_require_id,requires.getRequireId())
                .build()
                .execute(new RequireDetailsCallback(onRequireDetailsListener));
    }
}
